Name | Type | Length | IsNullable | Collation |
OrderID | int | 4 | ||
Subtotal | money | 8 |
create view "Order Subtotals" AS
SELECT "Order Details".OrderID, Sum(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS Subtotal
FROM "Order Details"
GROUP BY "Order Details".OrderID